import React, {Component} from 'react';
import {NavLink} from 'react-router-dom';
export default class MyNavLink extends Component {
    render() {
        // const {to, text} = this.props;
        return (
            // <NavLink className="list-group-item" to={to} activeClassName="activeClass">{text}</NavLink>
            // 将外部的所有属性传递给NavLink
            <NavLink  activeClassName="activeClass" {...this.props}/>
        )
    }
};